package jnBase.view
{
	import jnBase.Data;
	import jnBase.PSteps;
	
	import laya.display.Text;
	import laya.events.Event;
	import laya.ui.Box;
	import laya.utils.Handler;
	
	import ui.tools.PaiHangBangUI;
	
	public class PaiHangView extends PaiHangBangUI
	{
		private var _dSource:Array;
		public function PaiHangView()
		{
			super();
		}
		
		override public function onAwake():void
		{
			// TODO Auto Generated method stub
			super.onAwake();
			if(Data.isExamComplete){
				tips.text="考核完成！";
			}
			else {
				tips.text="考核未完成!";
			}
			trace("paihang onawake");
			btn_exit.once(Event.CLICK,this,function():void{
				PSteps.exitShiyan();
			});
		}
		
		override public function onClosed(type:String=null):void
		{
			// TODO Auto Generated method stub
			super.close(type);
			trace("paihang onClosed");
		}
		
		/**
		 *转换时间格式 
		 * @param param0
		 * @return 
		 * 
		 */		
		private function formatTime(param0:Number):String
		{
			// TODO Auto Generated method stub
			var h:String=format2(Math.floor(param0/3600));
			var m:String=format2(Math.floor((param0-parseInt(h)*3600)/60));
			var s:String=format2(param0%60);
			return h+":"+m+":"+s;
		}
		/**
		 *将数字变成2位字符串 
		 * @param param0
		 * @return 
		 * 
		 */		
		private function format2(param0:Number):String
		{
			// TODO Auto Generated method stub
			if(param0<10){
				return "0"+param0;
			}
			else return param0+"";
		}
	}
}